package cn.tedu.straw.portal.controller;


import cn.tedu.straw.commons.model.Permission;
import cn.tedu.straw.portal.service.IPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author tedu.cn
 * @since 2020-07-18
 */
@RestController
@RequestMapping("/v1/permissions")
public class PermissionController {

    @Autowired
    private IPermissionService permissionService;

    @GetMapping("/")
    public List<Permission> getByUserId(Integer userId){
return permissionService.getByUserId(userId);
    }
}
